﻿@model DFYE.Web.Models.channel

@{
    ViewBag.Title = "Edit";
    Layout = "~/Areas/powerManage/Views/Shared/manage.cshtml";
}

<h2>频道管理</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>频道</legend>

        @Html.HiddenFor(model => model.ID)
            @if (Model.parentID != null)
            {
            <div class="editor-label">
                父频道
            </div>

            <div class="editor-field">
                @Html.DropDownList("parentID", new SelectList(ViewBag.parents, "ID", "name"))
            </div>
            }
        <div class="editor-label">
            名称
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.name)
            @Html.ValidationMessageFor(model => model.name)

            @(Html.CheckBox("able", true))可见
        </div>

        <div class="editor-label">
            说明
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.exp)
            @Html.ValidationMessageFor(model => model.exp)
            此项为频道说明性文本，将呈现与页面作为子标题
        </div>

        <div class="editor-label">
            备注(不显示)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.bak)
            @Html.ValidationMessageFor(model => model.bak)
        </div>
    </fieldset>
@*    <fieldset>
        <legend>指定权限</legend>
        @Html.Partial("powerBox", Model.power)
    </fieldset> *@
    
        <p>
            <input type="submit" value="保存" />
        </p>
}

<div>
    @Html.ActionLink("回列表", "Index")
</div>

